package com.leeon.container;


import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

import static net.mindview.util.Print.print;

interface Selector {
    boolean end();

    Object current();

    void next();
}

public class Sequence {
    private int i;

    public Sequence(int i) {
        this.i = i;
    }

    @Override
    public String toString() {
        return String.format("Sequence %d", i);
    }

    public static void main(String[] args) {
        List<Sequence> sequence = new ArrayList<Sequence>();
        for (int i = 0; i < 10; i++)
            sequence.add(new Sequence(i));
        Iterator<Sequence> it = sequence.iterator();
        while (it.hasNext()){
            print(it.next().toString());
        }
    }
}
